evaluate a second degree polynomial containing variables